<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp" %>

<!DOCTYPE html>
<html>
<head>
    <title><spring:message code="message.title.center_zhuyonghu"></spring:message></title>
    <%@ include file="/WEB-INF/component/commonCSS.jsp" %>
    <style type="text/css">
       
    </style>
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
    <section class="content-header">
        <h1>血压</h1>
        <ol class="breadcrumb">
            <li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i>首页</a></li>
             <li class="active"><a href="#">血压</a></li>
        </ol>
    </section>
    
    <section class="content">
        <div class=" box box-success">
            <div class="box-body">
                <form id="form">
                    <div class="input">
                    <div class="textalign1">标题：</div>
                    <div class="boxinput">
                        <input type="text" class="textinput" id="title" name="title" placeholder="标题" maxlength="25" />
                    </div>
                    <button type="button" class="btn btn-success btn-sm" onclick="search();">查 询</button>
                </div>
               
              </form>  
            </div>
        </div>
        <table class="jqgrid" id="gridlist"></table>
        <div id="gridpage"></div>
		
		
		
		
    </section>
    <%@ include file="/WEB-INF/component/commonJS.jsp" %>
    <script type="text/javascript">
    	function search(page) {
    		var data = formatForm("form");
    		$("#gridlist").jqGrid('setGridParam',{  
    	        datatype:'json',
    	        postData:data,
    	        page : (page || 1)
    	    }).trigger("reloadGrid"); //重新载入  
    	}
    	
        $(function () {
            $("#gridlist").jqGrid({
                url: "${ctx}/bloodPressure/getBloodPressureList.html",
                mtype: "post",
                datatype: "json",
                autowidth: true,
                height: 250,
                colNames: ['操作', '标题','内容', '是否置顶', '创建时间'],
                colModel: [
					{ name: 'id', width: 8, align:"left", sortable: false,formatter : function(val, opts, rowdata) {
				            var str = "<a href='#' onclick='showEdit(\""+val+"\")'>修改</a>";
	    	                return str;
	                    }},
                    { name: 'title', width: 10, align:"left", sortable: false},
                    { name: 'content', width: 5, align:"center", sortable: false },
                    { name: 'is_top', width: 10, align: 'left', sortable: false},
                    { name: 'create_time', width: 10, align: 'left', sortable: false}
                ],
                rowNum: 20,
                rowList: [10, 20, 30],
                rownumbers: true,
                pager: "#gridpage",
                multiselect: true, 
                viewrecords: true,
                caption: "血压列表",
                gridComplete:function(){
                    autoRNWidth("gridlist");
                },
                jsonReader: {
                    id: "id"
                }
            });
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
            $(window).trigger("resize");
        });
    </script>
</body>
</html>












